package com.np.intentdemo1;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

public class SecondActivity extends AppCompatActivity {

    private TextView mViewEmail;
    private EditText mFormPassword;
    private Button mButtonNext;
    private Button mButtonBack;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_second);

        mViewEmail = findViewById(R.id.view_email);
        mFormPassword = findViewById(R.id.form_password);
        mButtonNext = findViewById(R.id.button_next);
        mButtonBack = findViewById(R.id.button_back);

        mButtonNext.setOnClickListener(v -> {

        });

        mButtonBack.setOnClickListener(v -> {
            startActivity(new Intent(getApplicationContext(), MainActivity.class));
            finish();
        });

        Intent intent = getIntent();
        mViewEmail.setText(intent.getStringExtra("email"));
    }
}